package com.sunducation.wts.room.dao

import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.Query
import com.sunducation.wts.room.bean.Book

@Dao
interface BookDao {
    @Insert
    fun insertAll(vararg books: Book)

    @Query("SELECT * FROM BOOK WHERE bookId = (:id) LIMIT 1")
    fun queryBookById(id: Long): Book

    @Delete
    fun delete(book: Book)
}